#字典
books={'title':'我直呼666','price':45}
print(books,type(books),books['price'])
books['price']=45*0.88
print(books['price'])
books['author']='somebody'
print(books)
del books['author']
print(books)

#遍历字典
for key in books:
print(books[key])

print(dir(books))

#分支语句
tall=float(input('请输入你的身高'))
weight=int(input('请输入你的体重'))
bmi=weight/tall**2
print(bmi)
if(bmi>11 and bmi<21):
    print('体重正常')
else:
    print('体重不正常')
print(bmi,_round_(2))
if(bmi<11):
    print('偏瘦')
elif(bmi>=11 and bmi<=21):
    print('体重正常')
elif(bmi>21 and bmi<26):
    print('偏胖')
elif:
    print('肥胖人士')




# 函数
def bmi(tall, weight):
    return weight / (tall * tall)


def diagBMI(bmi):
    if (bmi >= 18.5 and bmi < 23.9):
        print('你的体重正常')
    else:
        print('你的体重不正常')





# 类
class Person:
    def __init__(self, name):
        self.name = name

    def whoami(self):
        return "You are " + self.name


print(Person)

p1 = Person('tom')
print(p1.whoami())
print(p1.name)